package desktop.conf;

public class LevelConf {
	/** 0.1很简单，0.3可以为是最终速度 **/
	private static double speedInit = 0.1;

	/** 每间隔TimeUnit的时间，增加speedUnit的速度 **/
	private static double speedUnit = 0.002;
	private static double timeUnit = 1000;

	/** 速度增加了levelUnit后，认为升了一级 **/
	private static double levelUnit = 0.02;

	public static double getSpeedInit() {
		return speedInit;
	}

	public static void setSpeedInit(double speedInit) {
		LevelConf.speedInit = speedInit;
	}

	public static double getSpeedUnit() {
		return speedUnit;
	}

	public static void setSpeedUnit(double speedUnit) {
		LevelConf.speedUnit = speedUnit;
	}

	public static double getTimeUnit() {
		return timeUnit;
	}

	public static void setTimeUnit(double timeUnit) {
		LevelConf.timeUnit = timeUnit;
	}

	public static double getLevelUnit() {
		return levelUnit;
	}

	public static void setLevelUnit(double levelUnit) {
		LevelConf.levelUnit = levelUnit;
	}

	public static int getLevel(double speed) {
		return (int) ((speed - speedInit) / levelUnit);
	}
}
